'use strict';
const requireEx=require('yi-require');
const $ = requireEx('yi-schema');

module.exports = {
  body: $.object({
    title:$.string().min(1).max(40).description("标题"),
    picPath:$.string().required().description("图片路径"),
    soundPath:$.string().description("声音/视频路径"),
    picList:$.array().items($.string()).description('图片列表'),
    cardType:$.string().valid('图片','视频').description("卡片类型"),
    mallId:$.mongoid().description('商场Id'),
    storeId:$.mongoid().description('商铺Id'),
    cardAccessory:$.string().valid('优惠券','现金红包','').default('').description("卡片附件"),
    latitude:$.number().description("纬度"),
    longitude:$.number().description("经度"),
    place:$.string().min(1).description("地点"),
    cardKindID:$.mongoid().allow('').description("卡片种类ID"),
    goodsId:$.array().items($.mongoid()).description("关联商品ID数组"),
    authorID:$.mongoid().description("作者ID"),
    headPicPath:$.string().required().description("头像图片路径"),
    nickname:$.string().required().min(1).max(16).description("昵称"),
    likeID:$.array().items($.mongoid()).default([]).description("点赞者ID"),
    commentID:$.array().items($.mongoid()).default([]).description("评论ID"),
    checkState:$.number().valid(0,1).default(1).description("审核状态，1：审核通过，0：审核不通过，默认1")
  })
};
